'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.post('/news/pages', controller.news.pages);
  router.post('/news/save', controller.news.save);
  router.delete('/news/delete', controller.news.delete);
  router.put('/news', controller.news.update);
  router.get('/news/list', controller.news.list);
  router.post('/dict/pages', controller.dict.pages);
  router.post('/dict/save', controller.dict.save);
  router.delete('/dict/delete', controller.dict.delete);
  router.put('/dict', controller.dict.update);
  router.get('/dict/list', controller.dict.list);
  router.post('/dict/item/pages', controller.dictItem.pages);
  router.post('/dict/item/save', controller.dictItem.save);
  router.delete('/dict/item/delete', controller.dictItem.delete);
  router.put('/dict/item', controller.dictItem.update);
  router.get('/dict/item/list', controller.dictItem.list);
};
